package com.mayikt;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PersonController {

	// 127.0.0.1/jz/sys01?name=李洁
	@RequestMapping("/sys01")
	public String sys01(String name) {
		return name;
	}

	// 127.0.0.1/jz/sys02?name=李洁
	@RequestMapping("/sys02")
	public String sys02(String name) {
		return name;
	}

    // 127.0.0.1/jz/sys03?name=李洁
    @RequestMapping("/sys03")
    public String sys03(String name) {
        return name;
    }

	// 127.0.0.1/jz/hello/李洁
	@RequestMapping(value = { "/hello/{name}" }, produces = { "text/html;charset=UTF-8;" })
	public String say(@PathVariable String name) {
		return "你好" + name;
	}

	// 127.0.0.1/jz/ai?a=10&b=20
	@RequestMapping("/ai")
	public String test01(int a, int b) {
		return "a*b=" + a * b;
	}

}
